package com.paolu.jframe;

import javax.swing.*;
import com.paolu.function.*;
import com.paolu.utils.BallNumber;

public class MainJFrame extends JFrame {

    public MainJFrame() {
        initMainJFrame();
        initButton();
    }
    private void initMainJFrame() {

        this.setTitle("双色球");
        this.setSize(800, 600);

        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);

    }

    private void initButton(){
        JButton randomButton = new JButton("开始生成");
        randomButton.setBounds(300, 200, 150, 50);
        randomButton.addActionListener(e -> {
            RandomBallNumber randomBallNumber=new RandomBallNumber();
            BallNumber ballNumber=new BallNumber();
            ballNumber=randomBallNumber.randomNumber(ballNumber);

        });
        this.add(randomButton);
    }


}
